-
Notifications
You must be signed in to change notification settings - Fork 4k
Add new optional parameter SecuredVMOsDiskEncryptionSetId in Restore-AzRecoveryServicesBackupItem #28203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…yServicesBackupItem
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new optional parameter CVMOsDiskEncryptionSetId
to the Restore-AzRecoveryServicesBackupItem
cmdlet for encrypting the OS disk of restored Confidential VMs (secured VMs with managed disks).
- Adds the
CVMOsDiskEncryptionSetId
parameter to support disk encryption set specification during VM restore operations - Updates help documentation and parameter descriptions for the new encryption functionality
- Includes comprehensive test coverage for the new parameter with multiple scenarios
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
RestoreAzureRMRecoveryServicesBackupItem.cs | Adds the new CVMOsDiskEncryptionSetId parameter and integrates it into restore logic |
IaasVmPsBackupProvider.cs | Implements backend logic to handle the encryption set ID in restore requests |
ParamHelpMsgs.cs | Adds help message constant for the new parameter |
CmdletParamEnums.cs | Adds the new parameter to the RestoreVMBackupItemParams enum |
Restore-AzRecoveryServicesBackupItem.md | Updates cmdlet documentation with new parameter details |
ChangeLog.md | Documents the new feature addition |
ItemTests.ps1 | Adds comprehensive test function for the new parameter |
ItemTests.cs | Registers the new test in the test framework |
Comments suppressed due to low confidence (3)
src/RecoveryServices/RecoveryServices/ChangeLog.md:21
- The parameter name in the changelog should match the actual parameter name. The changelog uses 'CVMOsDiskEncryptionSetId' but the PR title and description refer to 'SecuredVMOsDiskEncryptionSetId'. Based on the code changes, the correct name is 'CVMOsDiskEncryptionSetId'.
* Added new optional parameter CVMOsDiskEncryptionSetId in Restore-AzRecoveryServicesBackupItem.
src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/IaasVm/ItemTests.ps1:1360
- The parameter name used in the test is 'CVMOSDiskEncryptionSetId' but should be 'CVMOsDiskEncryptionSetId' to match the actual parameter name defined in the cmdlet.
$restoreJob = Restore-AzRecoveryServicesBackupItem -VaultId $vault.ID -VaultLocation $vault.Location `
src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/IaasVm/ItemTests.ps1:1372
- The parameter name used in the test is 'CVMOSDiskEncryptionSetId' but should be 'CVMOsDiskEncryptionSetId' to match the actual parameter name defined in the cmdlet.
$restoreJob = Restore-AzRecoveryServicesBackupItem -VaultId $vault.ID -VaultLocation $vault.Location `
...Services/RecoveryServices.Backup/Cmdlets/Restore/RestoreAzureRMRecoveryServicesBackupItem.cs
Outdated
Show resolved
Hide resolved
src/RecoveryServices/RecoveryServices/help/Restore-AzRecoveryServicesBackupItem.md
Outdated
Show resolved
Hide resolved
/azp run azure-powershell - security-tools |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
In this PR I have added new optional parameter SecuredVMOsDiskEncryptionSetId in Restore-AzRecoveryServicesBackupItem. This parameter will take disk encryption set id as input and it will be used for encryption of restored secured VM OS disk.
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.